/* 基础变量 */
$primary-color: #1890ff;
$border-color: #e8e8e8;
$text-color: #333;
$text-secondary: #666;
$active-color: #e6f7ff;

/* 页面容器 */
.myspace-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background-color: #f5f5f5;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* 横向标签导航栏 */
.myspace-tabs {
  display: flex;
  align-items: center;
  background-color: #fff;
  padding: 0 20px;
  border-bottom: 1px solid $border-color;
  overflow-x: auto; // 允许横向滚动
  white-space: nowrap; // 防止标签换行

  &__item {
    padding: 12px 16px;
    cursor: pointer;
    font-size: 14px;
    position: relative;
    transition: all 0.3s;

    &:hover {
      color: $primary-color;
    }

    &--active {
      color: $primary-color;
      font-weight: 500;

      // 底部指示条
      &::after {
        content: '';
        position: absolute;
        bottom: -1px;
        left: 0;
        width: 100%;
        height: 2px;
        background-color: $primary-color;
      }
    }
  }

  // 添加按钮
  &__add-btn {
    margin-left: auto; // 靠右对齐
    background-color: $primary-color;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    flex-shrink: 0; // 防止按钮被压缩

    &:hover {
      background-color: darken($primary-color, 10%);
    }
  }
}

/* 内容区域 */
.myspace-content {
  flex: 1;
  padding: 20px;

  /* 空状态提示 */
  &__empty {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 300px;
    color: $text-secondary;
    font-size: 16px;
    background-color: #fff;
    border-radius: 8px;
  }

  /* 筛选栏 */
  &__filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid $border-color;
  }

  &__filter {
    display: flex;
    align-items: center;
    font-size: 14px;
    cursor: pointer;

    &-label {
      margin-right: 4px;
    }

    &-arrow {
      font-size: 12px;
      color: $text-secondary;
    }
  }

  /* 上传区域 */
  &__upload-area {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 300px;
    background-color: #fff;
    border-radius: 8px;
    border: 1px dashed $border-color;
    margin-top: 20px;
  }

  &__upload-hint {
    text-align: center;
    margin-bottom: 20px;
    color: $text-secondary;
    font-size: 14px;
    line-height: 1.6;
  }

  &__upload-btns {
    display: flex;
    gap: 15px;
  }

  &__upload-btn,
  &__import-btn {
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
  }

  &__upload-btn {
    background-color: $primary-color;
    color: white;
    border: none;

    &:hover {
      background-color: darken($primary-color, 10%);
    }
  }

  &__import-btn {
    background-color: #fff;
    color: $primary-color;
    border: 1px solid $primary-color;

    &:hover {
      background-color: $active-color;
    }
  }
}

/* 响应式设计 */
@media (max-width: 768px) {
  .myspace-content {
    padding: 15px;
  }

  .myspace-content__filters {
    gap: 10px;
  }

  .myspace-content__upload-area {
    height: 200px;
  }
}